<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String formUrl=request.getParameter("formUrl");
	if(StringUtils.isBlank(formUrl)){
		formUrl="newBusinessReq_saveOrCommitTask.action";
	}
	
	
	String reDoformUrl=request.getParameter("reDoformUrl");
	if(StringUtils.isBlank(reDoformUrl)){
		reDoformUrl="flowTaskCommon_commitRedoTask.action";
	}
	
	
	
 %>
<div style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px;margin-right: 20px">
<div style="float: left;width: 670px">

	<c:choose>
	<c:when test="${taskView.procTranRecord!=null&&taskView.procTranRecord.state!='end'}">
		<c:if test="${taskView.procTranRecord.taskType!='03'}">
		<button onclick="commitNotValidForm('<%=formUrl %>',false);" style="margin-right: 6px">保存</button>
		<button id="commitTaskBt1" onclick="commitForm('<%=formUrl %>',true);" style="margin-right: 6px">提交</button>
		<button id="commitTaskBt2" type="button" onclick="rollBackForm('flowTaskCommon_toTaskRollBack.action')" style="margin-right: 6px">回退</button>
		<%-- 
		
		<button id="commitTaskBt3" type="button" onclick="transferTaskForm('flowTaskCommon_toTaskTransferAssign.action?flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">转派</button>
		--%>
		<button id="commitTaskBt4" type="button" onclick="readToDoTaskForm('flowTaskCommon_toTaskReadingToDo.action?flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">传阅</button>
			<c:if test="${taskView.procTranRecord.processStep.nodeType==0 }">
				<button id="commitEndProcessBtnId" type="button" onclick="commitEndProcessForm('opMeetingProtocol.do?action=commitEndProcess&flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">结束工单</button>
			</c:if>	
		</c:if>
		
		<c:if test="${taskView.procTranRecord.taskType=='03'}">
		<button id="commitTaskBt6" type="button" onclick="commitReadToDoTaskForm('<%=reDoformUrl %>');" style="margin-right: 6px">阅毕</button>
		</c:if>
		
	</c:when>
	<c:otherwise>

	<c:if test="${taskView.procTranRecord!=null&&taskView.procTranRecord.taskType!='03' }">
	<%--
	<button id="commitTaskBt5" type="button" onclick="recyclingTaskForm('flowRecyclingTask.action')" style="margin-right: 6px">回收</button>
	--%>
	</c:if>			
	</c:otherwise>
	</c:choose>
	
	<c:if test="${showEndBtn=='true'&&taskView.processStatus.end==null}">
	<button id="showEndBtn" type="button" onclick="endProcessInst('${procinstId }')" style="margin-right: 6px">强制结束流程</button>
	</c:if>
	<button id="showGraphBtn" type="button" onclick="Echoice.popCenter('flowTaskCommon_printInstGraph.action?procinstId=${param.procinstId }',800,600)" style="margin-right: 6px">轨迹</button>
	<button id="backHistoryBtn" type="button" onclick="javascript:history.go(-1);" style="margin-right: 6px">返回</button>
</div>
</div>
